import request from '@/utils/request'

export const getActivityList = data => {
  return request({
    url: '/activity/getActivityList',
    method: 'post',
    data,
  })
}

export const delActivity = aid => {
  return request({
    url: '/activity/del?id=' + aid,
    method: 'delete',
  })
}

export const addActivity = data => {
  return request({
    url: '/activity/add',
    method: 'post',
    data,
  })
}

export const editActivity = data => {
  return request({
    url: '/activity/edit',
    method: 'put',
    data,
  })
}

export const getActivity = aid => {
  return request({
    url: '/activity/edit?id=' + aid,
    method: 'get',
  })
}

export const getActivityUsers = data => {
  return request({
    url: '/activity/getActivityUsers',
    method: 'post',
    data,
  })
}

export const delActivityUsers = uid => {
  return request({
    url: '/activity/delActivityUsers?id=' + uid,
    method: 'delete',
  })
}

export const resetActivityPalm = aid => {
  return request({
    url: '/activity/resetActivityPalm?id=' + aid,
    method: 'get',
  })
}

export const reportActivityPalm = data => {
  return request({
    url: '/activity/reportActivityPalm',
    method: 'post',
    data,
  })
}
export const getActivityLottery = aid => {
  return request({
    url: '/activity/getActivityLottery?id=' + aid,
    method: 'get',
  })
}